import config from "@/config"
import http from "@/utils/request"

export default {
	//客户
	client:{
		list: {
			url: `${config.API_URL}/adminapi/shop.ShopCustomer/lists`,
			name: "获取客户列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/shop.ShopCustomer/add`,
			name: "添加客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ShopCustomer/edit`,
			name: "修改客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ShopCustomer/delete`,
			name: "删除客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/shop.ShopCustomer/detail`,
			name: "客户详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/shop.ShopCustomer/all`,
			name: "客户 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        export: {
            url: `${config.API_URL}/adminapi/shop.ShopCustomer/import`,
			name: "客户导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
        },
	},
	//跟进
	follow:{
        list: {
			url: `${config.API_URL}/adminapi/shop.CustomerCommunicate/lists`,
			name: "获取客户跟进列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/shop.CustomerCommunicate/add`,
			name: "添加跟进",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/shop.CustomerCommunicate/detail`,
			name: "跟进详情信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
    //开票
	invoice:{
		list: {
			url: `${config.API_URL}/adminapi/project.OpenData/lists`,
			name: "获取开票列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/project.OpenData/add`,
			name: "添加开票",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/project.OpenData/edit`,
			name: "修改开票",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/project.OpenData/delete`,
			name: "删除开票",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/project.OpenData/detail`,
			name: "开票详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/project.OpenData/all`,
			name: "开票 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
	//酒店
    hotel:{
        list: {
			url: `${config.API_URL}/adminapi/shop.Hotel/lists`,
			name: "获取酒店列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/shop.Hotel/add`,
			name: "添加酒店",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.Hotel/edit`,
			name: "修改酒店",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.Hotel/delete`,
			name: "删除酒店",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
}
